#ifndef ANALOG_BUTTON_h
#define ANALOG_BUTTON_h

#include "WProgram.h"

class AnalogButtonClass
{
	public:
		
		typedef void AnalogButtonPushed(byte);

		void begin(byte adc, byte buttons, int values[], AnalogButtonPushed *analogButtonPushed);
		
		void handleValue(int value);
		
	private:
		byte adc;
		byte buttons;
		int *values;
		AnalogButtonPushed *analogButtonPushed;
		
		unsigned long lastMillis;
		byte lastButton;
		byte lastButtonPushed;

};

extern AnalogButtonClass AnalogButton;

#endif
